#include <iostream>
#include <string>

// 隐式声明构造函数

class User {
 private:
  int _age;
  std::string _name;

 public:
  User() {}

  explicit User(int age) : _age(age) {}

  User(const char* name) : _name(name) {}

  ~User() {}

  void display() { std::cout << _name.c_str() << " age " << _age << "\n"; }
};

int main(int argc, char const* argv[]) {
  User u1(2);
  u1.display();

  User u2 = "Jhon";  // 隐式声明
  u2.display();

  // User u0 = 1;
  // u0.display();

  return 0;
}
